<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<!-- 导入jQuery库 -->
	<script type="text/javascript" src="../../lib/jquery/jquery-1.11.3.min.js" ></script>
	
	<link rel="stylesheet" href="../../lib/My97DatePicker/skin/WdatePicker.css" />
	<script type="text/javascript" src="../../lib/My97DatePicker/lang/zh-cn.js" ></script>
	<script type="text/javascript" src="../../lib/My97DatePicker/WdatePicker.js" ></script>
	<script type="text/javascript" src="../../lib/My97DatePicker/calendar.js" ></script>
	
	<body>
		<h1>常规调用(带默认值)</h1>
		<input id="dp1" type="text" readonly="readonly" onClick="WdatePicker({startDate:'2018-01-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"/>
		
		<h1>图标触发</h1>
		<input id="dp2" type="text"/>
        <img onclick="WdatePicker({el:'dp2',startDate:'2018-01-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" src="../lib/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
		
		<script>
			$(function(){
				$("#dp1").val(today());//页面默认值
			});

		function today(){
		    var today=new Date();
		    var h=today.getFullYear();
		    var m=today.getMonth()+1;
		    var d=today.getDate();
		    m= m<10?"0"+m:m;      
		    d= d<10?"0"+d:d;  
		    return h+"-"+m+"-"+d;
		}
		</script>
		
		<h1>图标在内部</h1>
		<input id="pd3" class="Wdate" type="text" onclick="WdatePicker({skin:'whyGreen',minDate:'2006-09-10',maxDate:'2008-12-20'})"/>
		
	</body>
</html>
